public class demo02 {
    //顺序打印
    //有三个线程，线程名称分别为：a，b，c。
    //每个线程打印自己的名称。
    //需要让他们同时启动，并按 c，b，a的顺序打印
    public static void main(String[] args) {
        Thread t1=new Thread(()->{
            try {
                Thread.sleep(3000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println(Thread.currentThread().getName());
        },"a");
        t1.start();
        Thread t2=new Thread(()->{
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println(Thread.currentThread().getName());
        },"b");
        t2.start();
        Thread t3=new Thread(()->{
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println(Thread.currentThread().getName());
        },"c");
        t3.start();
    }
}
